﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;

namespace Simulation.Framework.Editor
{
    public static class WindowHelper
    {
        /// <summary>
        /// 创建 treeview 窗体
        /// </summary>
        public static PanelTreeViewWindow CreateTreeViewWindow()
        {
            PanelTreeViewWindow window = EditorWindow.GetWindow<PanelTreeViewWindow>("UI 页面属性配置");
            window.Show();
            window.Focus();
            return window;
        }

        /// <summary>
        /// 创建脚本窗体
        /// </summary>
        public static CreatePanelWindow GetCreatePanelWindow()
        {
            CreatePanelWindow window = EditorWindow.GetWindowWithRect<CreatePanelWindow>(new Rect(0, 0, 500, 400), true, "创建 UI 脚本");
            window.Show();
            window.Focus();
            return window;
        }

        /// <summary>
        /// 创建步骤窗体
        /// </summary>
        public static CreateStepWindow GetCreateStepWindow()
        {
            CreateStepWindow window = EditorWindow.GetWindowWithRect<CreateStepWindow>(new Rect(0, 0, 500, 400), true, "创建步骤脚本");
            window.Show();
            window.Focus();
            return window;
        }
    }
}